package elements.axis; 
import flash.display.Sprite;
import elements.Types.Style;

class YAxisRight extends YAxisBase {
	public function new( json:Dynamic ) {
		
		super( json, 'y_axis_right' );
		
		//
		// OK, the user has set the right Y axis,
		// but forgot to specifically set visible to
		// true, I think we can forgive them:
		//
		if( json.y_axis_right )
			style.visible = true;
			
		this.labels = new YAxisLabelsRight( this, json );
		this.addChild( this.labels );
	}
	
	public override function get_style():Style {
		//
		// default values for a right axis (turned off)
		//
		return {
			stroke:			2,
			tick_length	:	3,
			colour:			'#784016',
			offset:			false,
			grid_colour:		'#F5E1AA',
			grid_visible:		false,	// <-- this is off by default for RIGHT axis
			three_d:		0,
			steps:			1,
			visible:		false,
			min:			0,
			max:			10
		};
	}
	
	public override function resize( label_pos:Float, sc:ScreenCoords ):Void {		
		super.resize_helper( label_pos, sc, true);
	}
}
